Skip to content

Conversation

@gpshead
Copy link
Member

@gpshead gpshead commented Feb 8, 2026

Summary

  • freeze_support() called get_start_method() without allow_none=True, which locked in the default start method context as a side effect. This caused a subsequent set_start_method() call to raise RuntimeError: context has already been set.
  • Use allow_none=True and accept None as a matching value, since spawn.freeze_support() independently detects spawned child processes.
  • Check sys.frozen first as the more likely short-circuit (almost always False).

…fect

freeze_support() called get_start_method() without allow_none=True,
which locked in the default start method context. This caused a
subsequent set_start_method() call to raise "context has already been
set". Use allow_none=True and accept None as a matching value, since
spawn.freeze_support() independently detects spawned child processes.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
Test that freeze_support() does not lock in the default start method,
which would prevent a subsequent set_start_method() call.

Co-Authored-By: Claude Opus 4.6 <noreply@anthropic.com>
@gpshead gpshead added the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Feb 8, 2026
@bedevere-bot
Copy link

🤖 New build scheduled with the buildbot fleet by @gpshead for commit 31d115f 🤖

Results will be shown at:

https://buildbot.python.org/all/#/grid?branch=refs%2Fpull%2F144608%2Fmerge

If you want to schedule another build, you need to add the 🔨 test-with-buildbots label again.

@bedevere-bot bedevere-bot removed the 🔨 test-with-buildbots Test PR w/ buildbots; report in status section label Feb 8, 2026
@gpshead gpshead requested a review from picnixz February 8, 2026 23:25
@gpshead gpshead marked this pull request as ready for review February 8, 2026 23:26
@gpshead gpshead added needs backport to 3.13 bugs and security fixes needs backport to 3.14 bugs and security fixes labels Feb 8, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants